package com.zhoushihao.class0806;

import java.util.Scanner;

public class FindOppose {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr =new int[n];
        int[] num = new int[1001];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
            num[Math.abs(arr[i])]++;
        }
        int count = 0;
        for (int i = 0; i < num.length; i++) {
            count += num[i]/2;
        }
        System.out.println(count);
    }
}
